﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DimensionAddIn
{
    public class ExcelDataRect
    {
        public int BeginRow { get; set; }
        public int EndRow { get; set; }
        public int BeginCol { get; set; }
        public int EndCol { get; set; }

        /// <summary>
        /// 数据区域开始的行号(在excel上)
        /// </summary>
        public int DataBeginRow { get; set; }
        /// <summary>
        /// 数据区域开始的列(在excel上)
        /// </summary>
        public int DataBeginCol { get; set; }
        public int DataEndRow { get; set; }
        public int DataEndCol { get; set; }

        /// <summary>
        /// 页面维度所在的位置(在excel上)
        /// </summary>
        public List<ExcelPos> PageDimPos { get; set; }

        /// <summary>
        /// 当前可用的y维度的行号列表
        /// </summary>
        public List<int> YRowIndexList { get; set; }
        /// <summary>
        /// 当前可用的x维度的行号列表
        /// </summary>
        public List<int> XRowIndexList { get; set; }

        /// <summary>
        /// 检查是否有效
        /// </summary>
        /// <returns></returns>
        public bool IsValid()
        {
            if (BeginRow == 0
                || EndRow == 0
                || BeginCol == 0
                || EndCol == 0)
            {
                return false;
            }
            return true;
        }
    }
}
